3.2.54 \(\int \frac {c+d x^2+e x^4+f x^6}{x^2 \sqrt {a+b x^2}} \, dx\) [154]

Optimal. Leaf size=117 \[ -\frac {c \sqrt {a+b x^2}}{a x}+\frac {(4 b e-3 a f) x \sqrt {a+b x^2}}{8 b^2}+\frac {f x^3 \sqrt {a+b x^2}}{4 b}+\frac {\left (8 b^2 d-4 a b e+3 a^2 f\right ) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}} \]

[Out]

1/8*(3*a^2*f-4*a*b*e+8*b^2*d)*arctanh(x*b^(1/2)/(b*x^2+a)^(1/2))/b^(5/2)-c*(b*x^2+a)^(1/2)/a/x+1/8*(-3*a*f+4*b
*e)*x*(b*x^2+a)^(1/2)/b^2+1/4*f*x^3*(b*x^2+a)^(1/2)/b

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {1821, 1599, 1173, 396, 223, 212} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right ) \left (3 a^2 f-4 a b e+8 b^2 d\right )}{8 b^{5/2}}+\frac {x \sqrt {a+b x^2} (4 b e-3 a f)}{8 b^2}-\frac {c \sqrt {a+b x^2}}{a x}+\frac {f x^3 \sqrt {a+b x^2}}{4 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

-((c*Sqrt[a + b*x^2])/(a*x)) + ((4*b*e - 3*a*f)*x*Sqrt[a + b*x^2])/(8*b^2) + (f*x^3*Sqrt[a + b*x^2])/(4*b) + (
(8*b^2*d - 4*a*b*e + 3*a^2*f)*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(8*b^(5/2))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 396

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(
p + 1) + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 1173

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Simp[c^p*x^(4*p - 1)*(
(d + e*x^2)^(q + 1)/(e*(4*p + 2*q + 1))), x] + Dist[1/(e*(4*p + 2*q + 1)), Int[(d + e*x^2)^q*ExpandToSum[e*(4*
p + 2*q + 1)*(a + b*x^2 + c*x^4)^p - d*c^p*(4*p - 1)*x^(4*p - 2) - e*c^p*(4*p + 2*q + 1)*x^(4*p), x], x], x] /
; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] &&  !LtQ[
q, -1]

Rule 1599

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(m +
 n*p)*(a + b*x^(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, m, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] &
& PosQ[r - p]

Rule 1821

Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, c*x, x],
 R = PolynomialRemainder[Pq, c*x, x]}, Simp[R*(c*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] + Dist[1/(
a*c*(m + 1)), Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*(m + 2*p + 3)*x, x], x], x]] /;
FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && LtQ[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])

Rubi steps

\begin {align*} \int \frac {c+d x^2+e x^4+f x^6}{x^2 \sqrt {a+b x^2}} \, dx &=-\frac {c \sqrt {a+b x^2}}{a x}-\frac {\int \frac {-a d x-a e x^3-a f x^5}{x \sqrt {a+b x^2}} \, dx}{a}\\ &=-\frac {c \sqrt {a+b x^2}}{a x}-\frac {\int \frac {-a d-a e x^2-a f x^4}{\sqrt {a+b x^2}} \, dx}{a}\\ &=-\frac {c \sqrt {a+b x^2}}{a x}+\frac {f x^3 \sqrt {a+b x^2}}{4 b}-\frac {\int \frac {-4 a b d-a (4 b e-3 a f) x^2}{\sqrt {a+b x^2}} \, dx}{4 a b}\\ &=-\frac {c \sqrt {a+b x^2}}{a x}+\frac {(4 b e-3 a f) x \sqrt {a+b x^2}}{8 b^2}+\frac {f x^3 \sqrt {a+b x^2}}{4 b}+\frac {\left (8 a b^2 d-a^2 (4 b e-3 a f)\right ) \int \frac {1}{\sqrt {a+b x^2}} \, dx}{8 a b^2}\\ &=-\frac {c \sqrt {a+b x^2}}{a x}+\frac {(4 b e-3 a f) x \sqrt {a+b x^2}}{8 b^2}+\frac {f x^3 \sqrt {a+b x^2}}{4 b}+\frac {\left (8 a b^2 d-a^2 (4 b e-3 a f)\right ) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )}{8 a b^2}\\ &=-\frac {c \sqrt {a+b x^2}}{a x}+\frac {(4 b e-3 a f) x \sqrt {a+b x^2}}{8 b^2}+\frac {f x^3 \sqrt {a+b x^2}}{4 b}+\frac {\left (8 b^2 d-4 a b e+3 a^2 f\right ) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.21, size = 105, normalized size = 0.90 \begin {gather*} \frac {\sqrt {a+b x^2} \left (-8 b^2 c+4 a b e x^2-3 a^2 f x^2+2 a b f x^4\right )}{8 a b^2 x}+\frac {\left (-8 b^2 d+4 a b e-3 a^2 f\right ) \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{8 b^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

(Sqrt[a + b*x^2]*(-8*b^2*c + 4*a*b*e*x^2 - 3*a^2*f*x^2 + 2*a*b*f*x^4))/(8*a*b^2*x) + ((-8*b^2*d + 4*a*b*e - 3*
a^2*f)*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]])/(8*b^(5/2))

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 145, normalized size = 1.24

method result size
risch \(-\frac {\sqrt {b \,x^{2}+a}\, \left (-2 a b f \,x^{4}+3 a^{2} f \,x^{2}-4 a b e \,x^{2}+8 b^{2} c \right )}{8 b^{2} a x}+\frac {3 \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right ) a^{2} f}{8 b^{\frac {5}{2}}}-\frac {\ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right ) a e}{2 b^{\frac {3}{2}}}+\frac {d \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}\) \(123\)
default \(f \left (\frac {x^{3} \sqrt {b \,x^{2}+a}}{4 b}-\frac {3 a \left (\frac {x \sqrt {b \,x^{2}+a}}{2 b}-\frac {a \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{2 b^{\frac {3}{2}}}\right )}{4 b}\right )+e \left (\frac {x \sqrt {b \,x^{2}+a}}{2 b}-\frac {a \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{2 b^{\frac {3}{2}}}\right )+\frac {d \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}-\frac {c \sqrt {b \,x^{2}+a}}{a x}\) \(145\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

f*(1/4*x^3/b*(b*x^2+a)^(1/2)-3/4*a/b*(1/2*x*(b*x^2+a)^(1/2)/b-1/2*a/b^(3/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))))+e*
(1/2*x*(b*x^2+a)^(1/2)/b-1/2*a/b^(3/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2)))+d*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2)-
c*(b*x^2+a)^(1/2)/a/x

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 120, normalized size = 1.03 \begin {gather*} \frac {\sqrt {b x^{2} + a} f x^{3}}{4 \, b} - \frac {3 \, \sqrt {b x^{2} + a} a f x}{8 \, b^{2}} + \frac {d \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} + \frac {3 \, a^{2} f \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{8 \, b^{\frac {5}{2}}} + \frac {\sqrt {b x^{2} + a} x e}{2 \, b} - \frac {a \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right ) e}{2 \, b^{\frac {3}{2}}} - \frac {\sqrt {b x^{2} + a} c}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/4*sqrt(b*x^2 + a)*f*x^3/b - 3/8*sqrt(b*x^2 + a)*a*f*x/b^2 + d*arcsinh(b*x/sqrt(a*b))/sqrt(b) + 3/8*a^2*f*arc
sinh(b*x/sqrt(a*b))/b^(5/2) + 1/2*sqrt(b*x^2 + a)*x*e/b - 1/2*a*arcsinh(b*x/sqrt(a*b))*e/b^(3/2) - sqrt(b*x^2
+ a)*c/(a*x)

________________________________________________________________________________________

Fricas [A]
time = 3.30, size = 229, normalized size = 1.96 \begin {gather*} \left [\frac {{\left (4 \, a^{2} b x e - {\left (8 \, a b^{2} d + 3 \, a^{3} f\right )} x\right )} \sqrt {b} \log \left (-2 \, b x^{2} + 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + 2 \, {\left (2 \, a b^{2} f x^{4} - 3 \, a^{2} b f x^{2} + 4 \, a b^{2} x^{2} e - 8 \, b^{3} c\right )} \sqrt {b x^{2} + a}}{16 \, a b^{3} x}, \frac {{\left (4 \, a^{2} b x e - {\left (8 \, a b^{2} d + 3 \, a^{3} f\right )} x\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) + {\left (2 \, a b^{2} f x^{4} - 3 \, a^{2} b f x^{2} + 4 \, a b^{2} x^{2} e - 8 \, b^{3} c\right )} \sqrt {b x^{2} + a}}{8 \, a b^{3} x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/16*((4*a^2*b*x*e - (8*a*b^2*d + 3*a^3*f)*x)*sqrt(b)*log(-2*b*x^2 + 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2*(2*
a*b^2*f*x^4 - 3*a^2*b*f*x^2 + 4*a*b^2*x^2*e - 8*b^3*c)*sqrt(b*x^2 + a))/(a*b^3*x), 1/8*((4*a^2*b*x*e - (8*a*b^
2*d + 3*a^3*f)*x)*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) + (2*a*b^2*f*x^4 - 3*a^2*b*f*x^2 + 4*a*b^2*x^2*e
 - 8*b^3*c)*sqrt(b*x^2 + a))/(a*b^3*x)]

________________________________________________________________________________________

Sympy [A]
time = 4.23, size = 250, normalized size = 2.14 \begin {gather*} - \frac {3 a^{\frac {3}{2}} f x}{8 b^{2} \sqrt {1 + \frac {b x^{2}}{a}}} + \frac {\sqrt {a} e x \sqrt {1 + \frac {b x^{2}}{a}}}{2 b} - \frac {\sqrt {a} f x^{3}}{8 b \sqrt {1 + \frac {b x^{2}}{a}}} + \frac {3 a^{2} f \operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )}}{8 b^{\frac {5}{2}}} - \frac {a e \operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )}}{2 b^{\frac {3}{2}}} + d \left (\begin {cases} \frac {\sqrt {- \frac {a}{b}} \operatorname {asin}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b < 0 \\\frac {\sqrt {\frac {a}{b}} \operatorname {asinh}{\left (x \sqrt {\frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b > 0 \\\frac {\sqrt {- \frac {a}{b}} \operatorname {acosh}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- a}} & \text {for}\: b > 0 \wedge a < 0 \end {cases}\right ) - \frac {\sqrt {b} c \sqrt {\frac {a}{b x^{2}} + 1}}{a} + \frac {f x^{5}}{4 \sqrt {a} \sqrt {1 + \frac {b x^{2}}{a}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/x**2/(b*x**2+a)**(1/2),x)

[Out]

-3*a**(3/2)*f*x/(8*b**2*sqrt(1 + b*x**2/a)) + sqrt(a)*e*x*sqrt(1 + b*x**2/a)/(2*b) - sqrt(a)*f*x**3/(8*b*sqrt(
1 + b*x**2/a)) + 3*a**2*f*asinh(sqrt(b)*x/sqrt(a))/(8*b**(5/2)) - a*e*asinh(sqrt(b)*x/sqrt(a))/(2*b**(3/2)) +
d*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), (a > 0) & (b < 0)), (sqrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a),
 (a > 0) & (b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), (b > 0) & (a < 0))) - sqrt(b)*c*sqrt(a/(b*x**2)
 + 1)/a + f*x**5/(4*sqrt(a)*sqrt(1 + b*x**2/a))

________________________________________________________________________________________

Giac [A]
time = 1.27, size = 121, normalized size = 1.03 \begin {gather*} \frac {1}{8} \, \sqrt {b x^{2} + a} {\left (\frac {2 \, f x^{2}}{b} - \frac {3 \, a b f - 4 \, b^{2} e}{b^{3}}\right )} x + \frac {2 \, \sqrt {b} c}{{\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} - a} - \frac {{\left (8 \, b^{\frac {5}{2}} d + 3 \, a^{2} \sqrt {b} f - 4 \, a b^{\frac {3}{2}} e\right )} \log \left ({\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2}\right )}{16 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/8*sqrt(b*x^2 + a)*(2*f*x^2/b - (3*a*b*f - 4*b^2*e)/b^3)*x + 2*sqrt(b)*c/((sqrt(b)*x - sqrt(b*x^2 + a))^2 - a
) - 1/16*(8*b^(5/2)*d + 3*a^2*sqrt(b)*f - 4*a*b^(3/2)*e)*log((sqrt(b)*x - sqrt(b*x^2 + a))^2)/b^3

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {f\,x^6+e\,x^4+d\,x^2+c}{x^2\,\sqrt {b\,x^2+a}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)^(1/2)),x)

[Out]

int((c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)^(1/2)), x)

________________________________________________________________________________________